/*
 * XML Type:  AccountSyncResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.AccountSyncResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML AccountSyncResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class AccountSyncResponseImpl extends net.ofx.types.x2003.x04.impl.AbstractSyncResponseImpl implements net.ofx.types.x2003.x04.AccountSyncResponse
{
    
    public AccountSyncResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ACCTTRNRS$0 = 
        new javax.xml.namespace.QName("", "ACCTTRNRS");
    
    
    /**
     * Gets array of all "ACCTTRNRS" elements
     */
    public net.ofx.types.x2003.x04.AccountTransactionResponse[] getACCTTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ACCTTRNRS$0, targetList);
            net.ofx.types.x2003.x04.AccountTransactionResponse[] result = new net.ofx.types.x2003.x04.AccountTransactionResponse[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "ACCTTRNRS" element
     */
    public net.ofx.types.x2003.x04.AccountTransactionResponse getACCTTRNRSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.AccountTransactionResponse)get_store().find_element_user(ACCTTRNRS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "ACCTTRNRS" element
     */
    public int sizeOfACCTTRNRSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ACCTTRNRS$0);
        }
    }
    
    /**
     * Sets array of all "ACCTTRNRS" element
     */
    public void setACCTTRNRSArray(net.ofx.types.x2003.x04.AccountTransactionResponse[] accttrnrsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(accttrnrsArray, ACCTTRNRS$0);
        }
    }
    
    /**
     * Sets ith "ACCTTRNRS" element
     */
    public void setACCTTRNRSArray(int i, net.ofx.types.x2003.x04.AccountTransactionResponse accttrnrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.AccountTransactionResponse)get_store().find_element_user(ACCTTRNRS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(accttrnrs);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "ACCTTRNRS" element
     */
    public net.ofx.types.x2003.x04.AccountTransactionResponse insertNewACCTTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.AccountTransactionResponse)get_store().insert_element_user(ACCTTRNRS$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "ACCTTRNRS" element
     */
    public net.ofx.types.x2003.x04.AccountTransactionResponse addNewACCTTRNRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountTransactionResponse target = null;
            target = (net.ofx.types.x2003.x04.AccountTransactionResponse)get_store().add_element_user(ACCTTRNRS$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "ACCTTRNRS" element
     */
    public void removeACCTTRNRS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ACCTTRNRS$0, i);
        }
    }
}
